﻿<ul class="unit-list comment order-comment">
@if((Model.Comments as IEnumerable<dynamic>).Any())
{
    foreach(var i in Model.Comments)
    {
        <li class="unit comment order-comment">
            <section>
                <div class="html text-short">
                    <h4>@JDM.String(i.Title)</h4>
                    <p>@Html.Raw(HtmlUtility.FromPlainText(JDM.String(i.Text)))</p>
                </div>
            </section>
            <footer>
                <nav>
                    @if(i.Account != null)
                    {
                        <span>@T(Res.In("Common").Of("Expr").Name("By"), JDM.String(i.Account.Username))</span>
                        <span class="separator">&middot;</span>
                    }
                    <span>@Svc.DateTimeRel((DateTime)JDM.DateTime(i.CreatedOn))</span>
                </nav>
            </footer>
        </li>
    }
}
else
{
    <li class="empty"><span>@T(Res.In("Common").Of("Expr").Name("NoData"))</span></li>
}
</ul>